Fix bootloader support some more.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Thu, 15 Sep 2005 18:38:44 +0000 (18:38 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Thu, 15 Sep 2005 18:38:44 +0000 (18:38 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/XendDomainInfo.py

index b5b2c6afefbe9d2d3795a3886e3b02a3f9906ba4..01ac58ac9d72888254c5c248b0b58c4a259c8cdd 100644 (file)
@@ -642,7 +642,6 @@ class XendDomainInfo:
             self.configure_cpus(config)
             self.init_domain()
             self.register_domain()
-            self.configure_bootloader()
 
             # Create domain devices.
             self.configure_backends()
@@ -909,11 +908,6 @@ class XendDomainInfo:
             self.config.remove(['device', dev_config])
         self.deleteDevice(type, dev.getId())
 
-    def configure_bootloader(self):
-        """Configure boot loader.
-        """
-        self.bootloader = sxp.child_value(self.config, "bootloader")
-
     def configure_restart(self):
         """Configure the vm restart mode.
         """
@@ -983,14 +977,16 @@ class XendDomainInfo:
             self.restart_check()
             self.exportToDB()
             self.restart_state = STATE_RESTART_BOOTING
-            if self.bootloader:
-                self.configure_bootloader()
+            self.configure_bootloader()
             self.construct(self.config)
             self.saveToDB()
         finally:
             self.restart_state = None
 
     def configure_bootloader(self):
+        self.bootloader = sxp.child_value(self.config, "bootloader")
+        if not self.bootloader:
+            return
         # if we're restarting with a bootloader, we need to run it
         # FIXME: this assumes the disk is the first device and
         # that we're booting from the first disk